﻿
application.onAppStart = function()
{
	trace("Begin drawn figures transfer");
	
	// Get the server shared object
	application.drawing_so = SharedObject.get("Drawing");
	application.n = 0;
}

application.onConnect = function(client)
{
	trace("Client connecting ...");
	
	// Accept the client's connection
 	application.acceptConnection(client);

	trace("Connection accepted");
	
	client.call("setID", null, application.n.toString());
	application.n++;
}

application.onDisconnect = function(client)
{
	trace("Client disconnected.");
}
